home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 25 / CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso / CUCD / Magazine / C_Tutorial / Part-13 / PatchLib / source / include / private / patchbase.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-12-13  |  3.5 KB  |  102 lines

  1. #ifndef PATCH_BASE_PRIVATE_H
  2. #define PATCH_BASE_PRIVATE_H
  3. /*****************************************************************************/
  4. /*
  5. **    Filename:    libraries/patchbasePRIVATE.h
  6. **    Release:    6.0
  7. **    Date:        13.12.97
  8. **
  9. **    definition of patch.library PRIVATE base node fields
  10. **
  11. **    (C) Copyright 1993-97 Stefan Fuchs
  12. **    All Rights Reserved
  13. */
  14. /*****************************************************************************/
  15.  
  16. #ifndef    EXEC_TYPES_H
  17. #include <exec/types.h>
  18. #endif
  19.  
  20. #ifndef    EXEC_LISTS_H
  21. #include    <exec/lists.h>
  22. #endif    /* EXEC_LISTS_H */
  23.  
  24. #ifndef    EXEC_LIBRARIES_H
  25. #include    <exec/libraries.h>
  26. #endif    /* EXEC_LIBRARIES_H */
  27.  
  28. #ifndef    EXEC_SEMAPHORES_H
  29. #include    <exec/semaphores.h>
  30. #endif    /* EXEC_SEMAPHORES_H */
  31.  
  32. #ifndef    DOS_DOS_H
  33. #include    <dos/dos.h>
  34. #endif    /* DOS_DOS_H */
  35.  
  36.  
  37.  
  38. struct PatchBase
  39. {
  40.     struct Library PB_LibNode;
  41.     UBYTE PB_Flags;        /* see below */
  42.     UBYTE PB_pad;
  43.     BPTR  PB_SegList;
  44.  
  45.     struct    SignalSemaphore PB_Semaphore;        /* Semaphore to protect MasterPatchList */
  46.     struct    List        PB_MasterPatchHeader;    /* Listheader for MasterPatch structures */
  47.  
  48. /* Private stuff follows down here */
  49.     struct Library *PB_DosBase;
  50.     struct ExecBase *PB_SysBase;
  51.     LONG PB_PatchFunctionCounter;    /* The Support Program PatchSetFunction */
  52.                     /* may only be removed, if this Counter is */
  53.                     /* zero */
  54.     struct List    PB_NotifyListHeader;    /* Header of a double linked list */
  55.                         /* containing pointers to MsgPorts to */
  56.                         /* notify in the ln_Name fields */
  57. /* Fields new for V4: */
  58.     WORD PB_PatchSVActive;        /* If > 0 the support program PatchSupervisor */
  59.                     /* is active within the system */
  60.     WORD PB_PatchSVRemoveable;    /* If 0 the support program PatchSupervisor */
  61.                     /* may remove itself from the system */
  62.     APTR PB_MemoryPool;        /* >0, if memory pools are available */
  63.     struct List    PB_ProjectHeader;    /* Header of a double linked list */
  64.                         /* containing pointers to PatchProjects */
  65. /* Fields new for V5: */
  66.     WORD PB_OffsetCodeStart;    /* This contains the number of Bytes between PS_PatchCode */
  67.                     /* and the first Assembler Instruction for use by PatchSetFunc */
  68. /* Fields new for V6: */
  69.     WORD PB_StackExtensions;    /* Number of tasks, which can have a stackextension active for a function */
  70.                     /* Higher values mean higher memory usage */
  71.                     /* Default: 5 */
  72.     struct Library *PB_UtilityBase;
  73.     WORD PB_PSFVersion;        /* Version of installed PatchSetFunc (for work-arounds only) */
  74.                     /* PatchSetFunc 2.2 is the first version setting this value */
  75.     WORD PB_PSFRevision;        /* Revision of installed PatchSetFunc (for work-arounds only) */
  76.                     /* PatchSetFunc 2.2 is the first version setting this value */
  77.  
  78. };
  79.  
  80.  
  81. /* PB_Flags: */
  82.  
  83. #define PBF_CheckPC    (1L<<0)            /* If TRUE: Enable safe removal of patches! */
  84.                     /* Patch.library will use a hack, which */
  85.                     /* is highly dependent on OS versions and installed */
  86.                     /* processors and may therefore not work with */
  87.                     /* certain configurations */
  88.                     /* It's unlikly to crash the machine though */
  89.                     /* New with V4, default: TRUE */
  90. #define    PBF_PatchSetFuncActive (1L<<1)    /* If TRUE: A program redirects SetFunction() to patch.library */
  91.                     /* (older versions of PatchSetFunc do not set this bit) */
  92.                     /* New with V4, default: FALSE */
  93. #define PBF_BreakForbid (1L<<2)        /* If TRUE: Break forbid and disable, when */
  94.                     /* trying to get the global semaphore */
  95.                     /* New with V6, default: FALSE */
  96. #define PBF_NoStackAllocmem (1L<<3)    /* If TRUE: Do not call Allocmem for stack extension */
  97.                     /* New with V6, default: TRUE */
  98.  
  99.  
  100.  
  101. #endif    /* PATCH_BASE_PRIVATE_H */
  102.